{include file="header.html"}
<style>
    .ui-timepicker-div .ui-widget-header {margin-bottom: 8px;}
    .ui-timepicker-div dl {text-align: left;}
    .ui-timepicker-div dl dt {height: 25px; margin-bottom: -25px;}
    .ui-timepicker-div dl dd {margin: 0 10px 10px 65px;}
    .ui-timepicker-div td {font-size: 90%;}
    .ui-tpicker-grid-label {background: none; border: none; margin: 0; padding: 0;}
    .ui_tpicker_hour_label,.ui_tpicker_minute_label,.ui_tpicker_second_label,.ui_tpicker_millisec_label,.ui_tpicker_time_label{padding-left:20px}
</style>
<script type="text/javascript">
    $(function() {
        $('#start_time').datetimepicker();
        $('#join_end_time').datetimepicker();
        $('#end_time').datetimepicker();
        $('#addtem_form').validate({
            errorPlacement: function(error, element) {
                $(element).next('.field_notice').hide();
                $(element).after(error);
            },
            success: function(label) {
                label.addClass('right').text('OK!');
            },
            rules: {
                template_name: {
                    required: true
                },
                start_time: {
                    required: true
                },
                join_end_time: {
                    required: true
                },
                end_time: {
                    required: true
                }
            },
            messages: {
                template_name: {
                    required: '{$lang.not_empty}'
                },
                start_time: {
                    required: '{$lang.not_empty}'
                },
                join_end_time: {
                    required: '{$lang.not_empty}'
                },
                end_time: {
                    required: '{$lang.not_empty}'
                }
            }
        });
    });
</script>
<div id="rightTop">
    <p>{$lang.ju_template}</p>
    <ul class="subnav">
        <li><a class="btn1" href="index.php?app=jutemplate">{$lang.manage}</a></li>
        <li><span>{if $smarty.get.act eq 'add'}{$lang.add}{else}{$lang.edit}{/if}</span></li>
    </ul>
</div>
<div class="groupbuy">
    <div class="title">
        {$lang.handle_notice}
    </div>
    <ul>
        <li></li>
        <li>{$lang.ju_index_desc1}</li>
        <li>{$lang.ju_index_desc2}</li>
    </ul>
</div>
<div class="info">
    <form method="post" enctype="multipart/form-data" id="addtem_form">
        <table class="infoTable">
            <tr>
                <th class="paddingT15">
                    {$lang.ju_channel}:</th>
                <td class="paddingT15 wordSpacing5">
                    {html_radios options=$channel checked=$template.channel name=channel}
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.template_name}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input class="infoTableInput3" type="text" name="template_name" value="{$template.template_name|escape}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.start_time}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input  id="start_time" type="text"  name="start_time" value="{$template.start_time|date:complete}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.join_end_time}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input  id="join_end_time" type="text"  name="join_end_time" value="{$template.join_end_time|date:complete}" />
                </td>
            </tr>
            <tr>
                <th class="paddingT15">
                    {$lang.end_time}:</th>
                <td class="paddingT15 wordSpacing5">
                    <input  id="end_time" type="text"  name="end_time" value="{$template.end_time|date:complete}" />
                </td>
            </tr>

            <tr>
                <th></th>
                <td class="ptb20">
                    <input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
                    <input class="formbtn" type="reset" name="Submit2" value="{$lang.reset}" />
                </td>
            </tr>
        </table>
    </form>
</div>
{include file="footer.html"}